Finding roots of polynomial equation